package com.kasinf.springcloud.alibaba.controller;

import com.kasinf.springcloud.alibaba.domain.Order;
import com.kasinf.springcloud.alibaba.service.OrderService;
import com.kasinf.springcloud.entity.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author KAISER
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("create")
    public CommonResult<Order> create(Order order){
        orderService.create(order);
        return new CommonResult<>(200, "订单创建成功");
    }
}
